<template>
    <div class='hotelEdit'>
        <el-form :model="ruleForm" :rules="rules" ref="ruleForm" size="mini" label-width="160px" class="demo-ruleForm">
            <div>
                <div style="display:flex;">
                    <el-form-item label="城市名称" prop="cityName">
                        <el-input v-model="ruleForm.cityName"></el-input>
                    </el-form-item>
                    <el-form-item label="区/市名称" prop="countyName">
                        <el-input v-model="ruleForm.countyName"></el-input>
                    </el-form-item>
                    <el-form-item label="酒店名称" prop="hotelName">
                        <el-input v-model="ruleForm.hotelName"></el-input>
                    </el-form-item>
                </div>
                <div style="display:flex;">
                    <el-form-item label="酒店拼音" prop="pinYin">
                        <el-input v-model="ruleForm.pinYin"></el-input>
                    </el-form-item>
                    <el-form-item label="酒店简拼" prop="jianPin">
                        <el-input v-model="ruleForm.jianPin"></el-input>
                    </el-form-item>
                    <el-form-item label="酒店类型" prop="typeId">
                        <el-select v-model="ruleForm.typeId" placeholder="请选择活动区域">
                            <el-option label="预付" value="1"></el-option>
                            <el-option label="现付" value="2"></el-option>
                            <el-option label="担保" value="3"></el-option>
                        </el-select>
                    </el-form-item>
                </div>
                <div style="display:flex;">
                    <el-form-item label="星级编号" prop="starId">
                        <el-input v-model="ruleForm.starId" oninput="value=value.replace(/[^\d.]/g,'')"></el-input>
                    </el-form-item>
                    <el-form-item label="主题" prop="themes">
                        <el-input v-model="ruleForm.themes"></el-input>
                    </el-form-item>
                    <el-form-item label="商圈名称" prop="circleName">
                        <el-input v-model="ruleForm.circleName"></el-input>
                    </el-form-item>
                </div>
                <div style="display:flex;">
                    <el-form-item label="星级名称" prop="starName">
                        <el-input v-model="ruleForm.starName">
                        </el-input>
                    </el-form-item>
                    <el-form-item label="品牌名称" prop="brandName">
                        <el-input v-model="ruleForm.brandName"></el-input>
                    </el-form-item>
                    <el-form-item label="附近标识" prop="nearLandmark">
                        <el-input v-model="ruleForm.nearLandmark"></el-input>
                    </el-form-item>
                </div>
                <div style="display:flex;">
                    <el-form-item label="标签" prop="featureName">
                        <el-select style="width:183px;" v-model="ruleForm.featureName" placeholder="请选择标签">
                            <el-option label="热卖酒店" value="热卖酒店"></el-option>
                            <el-option label="地铁周边" value="地铁周边"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="活动标签" prop="activelabelName">
                        <el-input v-model="ruleForm.activelabelName"></el-input>
                    </el-form-item>
                    <el-form-item label="评分" prop="commentScore">
                        <el-input v-model="ruleForm.commentScore" oninput="value=value.replace(/[^\d.]/g,'')">
                        </el-input>
                    </el-form-item>
                </div>
                <div style="display:flex;">
                    <el-form-item label="地址" prop="address">
                        <el-input v-model="ruleForm.address" style="width:800px;" type="textarea" :rows="2"></el-input>
                    </el-form-item>
                </div>
                <div style="display:flex;">
                    <el-form-item label="高德纬度" prop="googleLat">
                        <el-input v-model="ruleForm.googleLat" style="width:300px;" type="textarea" :rows="1"
                            oninput="value=value.replace(/[^\d.]/g,'')"></el-input>
                    </el-form-item>
                    <el-form-item label="高德经度" prop="googleLon">
                        <el-input v-model="ruleForm.googleLon" style="width:300px;" type="textarea" :rows="1"
                            oninput="value=value.replace(/[^\d.]/g,'')"></el-input>
                    </el-form-item>
                </div>
                <div style="display:flex;">
                    <el-form-item label="百度纬度" prop="baiduLat">
                        <el-input v-model="ruleForm.baiduLat" style="width:300px;" type="textarea" :rows="1"
                            oninput="value=value.replace(/[^\d.]/g,'')"></el-input>
                    </el-form-item>
                    <el-form-item label="百度经度" prop="baiduLon">
                        <el-input v-model="ruleForm.baiduLon" style="width:300px;" type="textarea" :rows="1"
                            oninput="value=value.replace(/[^\d.]/g,'')"></el-input>
                    </el-form-item>
                </div>
                <div style="display:flex;">
                    <el-form-item label="评论数" prop="commentCount">
                        <el-input v-model="ruleForm.commentCount" oninput="value=value.replace(/[^\d.]/g,'')">
                        </el-input>
                    </el-form-item>
                    <el-form-item label="最低价" prop="baseMinPrice">
                        <el-input v-model="ruleForm.baseMinPrice" oninput="value=value.replace(/[^\d.]/g,'')">
                        </el-input>
                    </el-form-item>
                    <el-form-item label="是否有效" prop="isValid">
                        <el-select style="width:183px;" v-model="ruleForm.isValid">
                            <el-option label="是" value="1"></el-option>
                            <el-option label="否" value="0"></el-option>
                        </el-select>
                    </el-form-item>
                </div>
            </div>









            <div>
                <div style="display:flex;">
                    <el-form-item label="推荐级别" prop="recommendLevel">
                        <el-select style="width:183px;" v-model="ruleForm.recommendLevel" placeholder="请选择标签">
                            <el-option label="特牌" value="6"></el-option>
                            <el-option label="金牌" value="5"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="酒店英文名称" prop="hotelEname">
                        <el-input v-model="ruleForm.hotelEname"></el-input>
                    </el-form-item>
                    <el-form-item label="邮编" prop="postCode">
                        <el-input v-model="ruleForm.postCode"></el-input>
                    </el-form-item>
                </div>

                <div style="display:flex;">
                    <el-form-item label="是否公寓" prop="isApartment">
                        <el-select style="width:183px;" v-model="ruleForm.isApartment" placeholder="请选择标签">
                            <el-option label="否" value="0"></el-option>
                            <el-option label="是" value="1"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="开业时间" prop="openingDate">
                        <el-date-picker value-format="yyyy-MM-dd" v-model="ruleForm.openingDate" type="date"
                            placeholder="选择日期">
                        </el-date-picker>
                    </el-form-item>
                    <el-form-item label="是否经济型" prop="isEconomic">
                        <el-select style="width:183px;" v-model="ruleForm.isEconomic" placeholder="请选择标签">
                            <el-option label="否" value="0"></el-option>
                            <el-option label="是" value="1"></el-option>
                        </el-select>
                    </el-form-item>
                </div>
                <div style="display:flex;">
                    <el-form-item label="传真" prop="fax">
                        <el-input v-model="ruleForm.fax"></el-input>
                    </el-form-item>
                    <el-form-item label="装修日期" prop="renovationDate">
                        <el-date-picker value-format="yyyy-MM-dd" v-model="ruleForm.renovationDate" type="date"
                            placeholder="选择日期">
                        </el-date-picker>
                    </el-form-item>
                    <el-form-item label="前台电话" prop="phone">
                        <el-input v-model="ruleForm.phone"></el-input>
                    </el-form-item>
                </div>

                <div style="display:flex;">
                    <el-form-item label="酒店设施" prop="facilities">
                        <el-input v-model="ruleForm.facilities" style="width:800px;" type="textarea" :rows="2">
                        </el-input>
                    </el-form-item>
                </div>
                <div style="display:flex;">
                    <el-form-item label="酒店基础设施" prop="generalAmenities">
                        <el-input v-model="ruleForm.generalAmenities" style="width:800px;" type="textarea" :rows="2">
                        </el-input>
                    </el-form-item>
                </div>
                <div style="display:flex;">
                    <el-form-item label="酒店休闲设施" prop="recreationAmenities">
                        <el-input v-model="ruleForm.recreationAmenities" style="width:800px;" type="textarea" :rows="2">
                        </el-input>
                    </el-form-item>
                </div>
                <div style="display:flex;">
                    <el-form-item label="酒店服务设施" prop="serviceAmenities">
                        <el-input v-model="ruleForm.serviceAmenities" style="width:800px;" type="textarea" :rows="2">
                        </el-input>
                    </el-form-item>
                </div>
                <div style="display:flex;">
                    <el-form-item label="卖点" prop="sellingPoint">
                        <el-input v-model="ruleForm.sellingPoint" style="width:800px;" type="textarea" :rows="2">
                        </el-input>
                    </el-form-item>
                </div>
                <div style="display:flex;">
                    <el-form-item label="酒店简介" prop="houseIntro">
                        <el-input v-model="ruleForm.houseIntro" style="width:800px;" type="textarea" :rows="2">
                        </el-input>
                    </el-form-item>
                </div>
                <div style="display:flex;">
                    <el-form-item label="提示" prop="tips">
                        <el-input v-model="ruleForm.tips" style="width:300px;" type="textarea" :rows="1"></el-input>
                    </el-form-item>
                    <el-form-item label="交通" prop="traffic">
                        <el-input v-model="ruleForm.traffic" style="width:300px;" type="textarea" :rows="1"></el-input>
                    </el-form-item>
                </div>
                <div style="display:flex;">
                    <el-form-item label="周边信息" prop="surroundings">
                        <el-input v-model="ruleForm.surroundings" type="textarea" :rows="1"></el-input>
                    </el-form-item>
                    <el-form-item label="入住时间" prop="checkinTime">
                        <el-date-picker value-format="yyyy-MM-dd" v-model="ruleForm.checkinTime" type="date"
                            placeholder="选择日期">
                        </el-date-picker>
                    </el-form-item>
                    <el-form-item label="服务" prop="servicess">
                        <el-input v-model="ruleForm.servicess" type="textarea" :rows="1"></el-input>
                    </el-form-item>
                </div>
                <div style="display:flex;">
                    <el-form-item label="停车位" prop="parkingLot">
                        <el-input v-model="ruleForm.parkingLot" type="textarea" :rows="1"></el-input>
                    </el-form-item>
                    <el-form-item label="特色信息" prop="features">
                        <el-input v-model="ruleForm.features" type="textarea" :rows="1"></el-input>
                    </el-form-item>
                    <el-form-item label="标签" prop="featureName">
                        <el-input v-model="ruleForm.featureName" type="textarea" :rows="1"></el-input>
                    </el-form-item>
                </div>
                <div style="display:flex;">
                    <el-form-item label="酒店儿童政策" prop="child">
                        <el-input v-model="ruleForm.child" style="width:800px;" type="textarea" :rows="2"></el-input>
                    </el-form-item>
                </div>
                <div style="display:flex;">
                    <el-form-item label="自助早餐" prop="meal">
                        <el-input v-model="ruleForm.meal" type="textarea" :rows="1"></el-input>
                    </el-form-item>
                    <el-form-item label="宠物" prop="pet">
                        <el-input v-model="ruleForm.pet" type="textarea" :rows="1"></el-input>
                    </el-form-item>
                    <el-form-item label="备注" prop="remarks">
                        <el-input v-model="ruleForm.remarks" type="textarea" :rows="1"></el-input>
                    </el-form-item>
                </div>
            </div>













            <div style="display:flex;">
                <el-form-item label="房型名称" prop="roomName">
                    <el-input v-model="ruleForm.roomName" type="textarea" :rows="1"></el-input>
                </el-form-item>
                <el-form-item label="房型英文名称" prop="roomEn">
                    <el-input v-model="ruleForm.roomEn" type="textarea" :rows="1"></el-input>
                </el-form-item>
                <el-form-item label="房型代码" prop="roomCode">
                    <el-input v-model="ruleForm.roomCode"></el-input>
                </el-form-item>
            </div>

            <div style="display:flex;">
                <el-form-item label="房型面积" prop="roomArea">
                    <el-input v-model="ruleForm.roomArea"></el-input>
                </el-form-item>
                <el-form-item label="房间楼层" prop="roomFloor">
                    <el-input v-model="ruleForm.roomFloor"></el-input>
                </el-form-item>
                <el-form-item label="房间容纳人数" prop="roomPersonCount">
                    <el-input v-model="ruleForm.roomPersonCount"></el-input>
                </el-form-item>
            </div>
            <div style="display:flex;">
                <el-form-item label="wifi" prop="roomWifi">
                    <el-input v-model="ruleForm.roomWifi"></el-input>
                </el-form-item>
                <el-form-item label="房型描述" prop="roomDesc">
                    <el-input v-model="ruleForm.roomDesc" type="textarea" :rows="1"></el-input>
                </el-form-item>
                <el-form-item label="床型类型" prop="roomBedType">
                    <el-input v-model="ruleForm.roomBedType" type="textarea" :rows="1"></el-input>
                </el-form-item>
            </div>
            <div style="display:flex;">
                <el-form-item label="床型数量" prop="roomBedCount">
                    <el-input v-model="ruleForm.roomBedCount"></el-input>
                </el-form-item>
                <el-form-item label="床型宽度" prop="roomBedWidth">
                    <el-input v-model="ruleForm.roomBedWidth"></el-input>
                </el-form-item>
                <el-form-item label="床型描述" prop="roomBedDesc">
                    <el-input v-model="ruleForm.roomBedDesc" type="textarea" :rows="1"></el-input>
                </el-form-item>
            </div>

            <div style="display:flex;">
                <el-form-item label="价格类型" prop="priceType">
                    <el-input v-model="ruleForm.priceType" type="textarea" :rows="1"></el-input>
                </el-form-item>
                <el-form-item label="价格开始时间" prop="beginDate">
                    <el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="ruleForm.beginDate" type="datetime"
                        placeholder="选择日期">
                    </el-date-picker>
                </el-form-item>
                <el-form-item label="价格结束时间" prop="endDate">
                    <el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="ruleForm.endDate" type="datetime"
                        placeholder="选择日期">
                    </el-date-picker>
                </el-form-item>
            </div>
            <div style="display:flex;">
                <el-form-item label="佣金" prop="commission">
                    <el-input v-model="ruleForm.commission" oninput="value=value.replace(/[^\d.]/g,'')"></el-input>
                </el-form-item>
                <el-form-item label="成本价" prop="basePrice">
                    <el-input v-model="ruleForm.basePrice" oninput="value=value.replace(/[^\d.]/g,'')"></el-input>
                </el-form-item>
                <el-form-item label="销售价" prop="sellPrice">
                    <el-input v-model="ruleForm.sellPrice" oninput="value=value.replace(/[^\d.]/g,'')"></el-input>
                </el-form-item>
            </div>
            <div style="display:flex;">
                <el-form-item label="会员价" prop="vipPrice">
                    <el-input v-model="ruleForm.vipPrice" oninput="value=value.replace(/[^\d.]/g,'')"></el-input>
                </el-form-item>
                <el-form-item label="上酒店图片" style="display: flex; margin: 0 20px 0 0">
                    <el-upload ref="upload" :limit="1" action="/file/fileMapping/uploadAvatar" list-type="picture-card"
                        :on-success="handleAvatarSuccess" :on-preview="handlePictureCardPreview"
                        :on-remove="handleRemove">
                        <i class="el-icon-plus"></i>
                    </el-upload>
                </el-form-item>
            </div>
            <el-form-item>
                <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
                <el-button type="primary" @click="hotelreturn">返回</el-button>
            </el-form-item>
        </el-form>
    </div>
</template>

<script>
    import {
        type
    } from '../../common/format'
    export default {
        name: 'hotelEdit',
        data() {
            return {
                ruleForm: {
                    cityId: null,
                    countyId: null,
                    cityName: "",
                    countyName: "",
                    hotelName: "",
                    pinYin: "",
                    jianPin: "",
                    typeId: null,
                    // 图片路径
                    picPath: "",
                    starId: null,
                    starName: "",
                    brandName: "",
                    circleId: null,
                    circleName: "",
                    themes: "",
                    nearLandmark: "",
                    featureName: "",
                    activelabelName: "",
                    activelabelNameBg: "",
                    address: "",
                    googleLat: null,
                    googleLon: null,
                    baiduLat: null,
                    baiduLon: null,
                    commentScore: null,
                    commentCount: null,
                    baseMinPrice: null,
                    isValid: null,
                    recommendLevel: null,
                    ctripRecommendLevel: null,
                    roomTypeId: null,
                    breakfastId: null,
                    jsjHotelId: "",
                    hotelTypeId: "",
                    hotelEname: "",
                    postCode: "",
                    openingDate: "",
                    isApartment: null,
                    isEconomic: null,
                    renovationDate: "",
                    phone: "",
                    fax: "",
                    facilities: "",
                    generalAmenities: "",
                    recreationAmenities: "",
                    serviceAmenities: "",
                    sellingPoint: "",
                    houseIntro: "",
                    tips: "",
                    traffic: "",
                    surroundings: "",
                    checkinTime: "",
                    servicess: "",
                    parkingLot: "",
                    features: "",
                    featureName: "",
                    child: "",
                    meal: "",
                    pet: "",
                    remarks: "",
                    renovationDate: "",
                    roomName: "",
                    roomEn: "",
                    roomCode: "",
                    roomCount: "",
                    roomArea: "",
                    roomFloor: "",
                    roomPersonCount: "",
                    roomWifi: "",
                    roomDesc: "",
                    roomBedType: "",
                    roomBedCount: "",
                    roomBedWidth: "",
                    roomBedDesc: "",
                    roomPicture: "",
                    priceType: "",
                    priceType: "",
                    endDate: "",
                    commission: null,
                    basePrice: null,
                    sellPrice: null,
                },
            }

        },
        components: {},
        methods: {

        },
        created() {

        },
        mounted() {
            console.log(this.$route.params.hotelInfoDetaildata)
        }
    }
</script>
<style scoped>

</style>